#!/usr/bin/env python3

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node


def generate_launch_description():
    return LaunchDescription([
        # 声明参数
        DeclareLaunchArgument(
            'namespace',
            default_value='',
            description='节点命名空间'
        ),
        
        DeclareLaunchArgument(
            'use_sim_time',
            default_value='false',
            description='是否使用仿真时间'
        ),
        
        # 高度控制GUI节点
        Node(
            package='pb2025_sentry_nav',
            executable='altitude_controller.py',
            name='altitude_controller',
            namespace=LaunchConfiguration('namespace'),
            parameters=[{
                'use_sim_time': LaunchConfiguration('use_sim_time')
            }],
            output='screen',
            emulate_tty=True
        ),
    ]) 